let mongoose=require('../db/lian')
let jfqsj=require('../modu/jfq')



//互动消息
let shujuSchema=mongoose.Schema({
    usetou:String,
    usename:String,
    key:String,
    info:String,
    neir:Array,
    usepid:{
        type:mongoose.Types.ObjectId,
        ref:jfqsj.xinModel
    }
})
let shujuModel=mongoose.model('shujuSchema',shujuSchema,'shujuSchema')


//消息表
let xxinSchema=mongoose.Schema({
    usertu:String,
    usename:String,
    juese:Array,
    usepid:{
        type:mongoose.Types.ObjectId,
        ref:jfqsj.xinModel
    }
})
let xxinModel=mongoose.model('xxinSchema',xxinSchema,'xxinSchema')


// xxinModel.create({
//     usertu:'https://ts1.cn.mm.bing.net/th?id=OIP-C.6ZyK9nSZH54IassCkWHzIgAAAA&w=250&h=250&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2',
//     usename:'群聊',
//     usepid:'65edb414b46dec94d8fda9d3',
//     juese:['qunid']
// })

module.exports={shujuModel,xxinModel}